package com.Filter;

import javax.servlet.*;
import java.io.IOException;

//@WebFilter(filterName = "BillFilter",urlPatterns = "/*")
public class BillFilter implements Filter {
    public void destroy() {
        System.out.println("BillFilter已被销毁。");
    }

    public void doFilter(ServletRequest req, ServletResponse resp, FilterChain chain) throws ServletException, IOException {
        System.out.println("BillFilter过滤器执行。");
        chain.doFilter(req, resp);
    }

    public void init(FilterConfig config) throws ServletException {
        System.out.println("BillFilter过滤器初始化。");
    }
}
